//
//  MHSearchResultTableViewCell.m
//  MiaoCircle
//
//  Created by 许正荣 on 2018/5/14.
//  Copyright © 2018年 acgera. All rights reserved.
//

#import "MHSearchResultTableViewCell.h"
#import "MHSearchItemViewModel.h"

@implementation MHSearchResultTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.titleLable.textColor = MHTextColor333; //MHButtonRedBgColor;
     self.nickLable.textColor = MHMomentScreenNameTextColor;
     self.timeLable.textColor = MHMomentAskTextColor;
    self.titleLable.font = MHRegularFont_16;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

-(void)bindViewModel:(MHSearchItemViewModel * )viewModel
{
    self.titleLable.text = viewModel.model.content;
    self.nickLable.text = viewModel.model.publishUserName;
    self.timeLable.text = viewModel.model.transformTime;
    self.locationBtn.hidden = !viewModel.model.location.isShowLocation;
    [self.locationBtn setTitle:[NSString stringWithFormat:@" %@",viewModel.model.location.areaName] forState:0];
}
@end
